﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Microsoft.WindowsAzure.ServiceRuntime;

namespace AdminWeb.Controllers
{
    public abstract class BaseController : Controller
    {

        public BaseController()
        {
            // Set application title and description
            ViewBag.ApplicationTitle = RoleEnvironment.GetConfigurationSettingValue("ApplicationTitle");
            ViewBag.ApplicationDescription = RoleEnvironment.GetConfigurationSettingValue("ApplicationDescription");
            ViewBag.MachineName = "";
            ViewBag.InstanceId = "";

            if (RoleEnvironment.IsAvailable)
            {
                string message = String.Format("{0} is ready. Please wait while initilized NougakuDoController.",
                                                ViewBag.ApplicationTitle);
                //ViewBag.ErrorMessage = message;
            }
            else
            {
                //ViewBag.ErrorMessage = "RoleEnvironment is not available.";
            }
        }
    }
}